package com.lm.resilience4j.controller;

import com.lm.resilience4j.service.ExternalApiService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ApiController {

    private final ExternalApiService externalApiService;

    public ApiController(ExternalApiService externalApiService) {
        this.externalApiService = externalApiService;
    }

    @GetMapping("/api/call")
    public String callApi() {
        return externalApiService.callExternalApi();
    }
}